<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <body>
        <!--(kev) Linien-Detailanzeige-->
        <ui:composition template="index.xhtml">
            <ui:define name="left">
                <h:dataTable value="" width="100%">
                    <h:column>
                        <f:facet name="header">
                            <h2>#{lineViewManager.selectedLine.name}</h2>
                        </f:facet>
                    </h:column>
                </h:dataTable>
                <h:dataTable value="" width="100%">
                    <h:column>
                        <f:facet name="header">
                            Id: #{lineViewManager.selectedLine.id}
                        </f:facet>
                    </h:column>
                </h:dataTable>
                <h:dataTable value="#{lineViewManager.selectedLine.stops}" var="station" width="100%">
                    <f:facet name="header">
                        Stops:
                    </f:facet>
                    <h:column>
                        <h:form>
                            <h:commandLink action="#{stationViewManager.returnLinkToStationView(station)}" >#{station}</h:commandLink> <br />
                        </h:form>
                    </h:column>
                    <h:column>  
                        #{lineViewManager.calculateDistanceToPreviousStationByString(lineViewManager.selectedLine, station.toString())}
                    </h:column>
                    <h:column>
                        #{lineViewManager.calculateDistanceToStartStationByString(lineViewManager.selectedLine, station.toString())}
                    </h:column>
                    <h:column>
                        #{lineViewManager.calculateMinutesToPreviousStation(lineViewManager.selectedLine, station.toString())}
                    </h:column>
                </h:dataTable>               
                <h:dataTable value="" width="100%">
                    <h:column>
                        <f:facet name="header">
                            <h:graphicImage value="maps/#{sessionManager.hash}.jpg" alt="grafische Streckenansicht" width="100%"/>
                        </f:facet>
                    </h:column>
                </h:dataTable>      
                <h:dataTable value="#{lineViewManager.selectedLine.getReadableDepartureTimes(lineViewManager.selectedLine.stops.get(0))}" var="times" width="100%">
                    <h:column>
                        <f:facet name="header">
                            Times:
                        </f:facet>
                        #{times}
                    </h:column>
                </h:dataTable>  
            </ui:define>
        </ui:composition>
    </body>
</html>
